import VueRouter from 'vue-router'

import HomeContainer from './components/tapage/HomeContainer.vue'
import Membercontainer from './components/tapage/MemberContainer.vue'
import searchcontainer from './components/tapage/SearchContainer.vue'
import shopcartcontainer from './components/tapage/ShopcartContainer.vue'
import Newlist from './components/new/Newlist.vue'
import Newinfo from './components/new/newinfo.vue'
import photos from './components/photos/photocontainer.vue'
import photoinfo from './components/photos/phpotoinfo.vue'
import goodslist from './components/Goods/goodslist.vue'
import goodsinfo from './components/Goods/goodsinfo.vue'
//创建路由对象
const router = new VueRouter({
    routes:[
        { path: '/', redirect: '/home' },
        {path:'/home',component:HomeContainer},
        {path:'/contact',component:Membercontainer},
        {path:'/seach',component:searchcontainer},
        {path:'/cart',component:shopcartcontainer},
        {path:'/home/newlist',component:Newlist},
        {path:'/home/newinfo/:id',component:Newinfo,props:true},
        {path:'/home/photos',component:photos},
        {path:'/home/photoinfo/:id',component:photoinfo,props:true},
        {path:'/home/Goodslist',component:goodslist},
        {path:'/home/goodsinfo/:id',component:goodsinfo,props:true}
    ],
    linkActiveClass: 'mui-active'

})

export  default router